#include "widget.h"
#include <QApplication>
#include "mythread.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    Widget w;
    Mythread t;
    t.w = &w;

    QObject::connect(&t, SIGNAL(hide()), &w, SLOT(Hide()));
    QObject::connect(&t, SIGNAL(show()), &w, SLOT(Show()));

    w.show();

    QThread::sleep(3);
    t.start();

    return a.exec();
}
